#include "Linkedlist.h"
#include <iostream>

using namespace std;

int main()
{
    int size = 0;
    cin >> size;

    LinkedList<int> *linkedlist = new LinkedList<int>;

    for (int i = 0; i < size; i++)
    {
        int temp = 0;
        cin >> temp;
        linkedlist->push(temp);
    }

    linkedlist->deduplicatePrint();

    return 0;
}